package me.yobol.lintcode.naive.sort;

import me.yobol.lintcode.SortUtils;

/**
 *
 * @author Yobol
 */
public class SortIntegers implements ISortIntegers {

    /**
     * 
     * @param a 
     */
    @Override
    public void sortIntegers(int[] a) {
        for (int i = a.length - 1; i > 0; i--) {
            for (int j = 0; j < i; j++) {
                if (a[j + 1] < a[j]) {
                    SortUtils.swap(a, j, j + 1);
                }
            }
        }
    }
    
}
